<template>
  <Dialog
    v-model="show"
    @confirm="handleSubmit"
    @close="close"
    :title="$t('fundMana.reasonDia.失败原因')"
    width="600px"
    hideFooter
  >
    <div>
      <el-form 
        ref="formRef"
        :model="form"
        label-width="80px"
        class="p20"
      >
        <el-form-item :label="$t('fundMana.reasonDia.失败原因')">
          <el-input 
            v-model="form.reason"
            type="textarea"
            :placeholder="$t('fundMana.reasonDia.请输入失败原因')"
            :rows="5"
          />
        </el-form-item>
      </el-form>
    </div>
  </Dialog>
</template>
<script setup>
import { ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import Dialog from "@/components/dialog.vue";

const { t } = useI18n();
const show = defineModel();
const formRef = ref(null);

const form = ref({
  reason: '这就是失败的原因啊！',
});


watch(show, (val) => {
  if (val) {
  }
});

const handleSubmit = async () => {
  show.value = false;
};

const close = () => {
  show.value = false;
};
</script>
<style lang="scss" scoped>
.h-500 {
  height: 500px;
}
.lht-38 {
  line-height: 38px;
}
.w-120 {
  width: 120px;
}
</style>
